package tech.yangzhijie.basic.knowledge.basic;

import java.util.*;

public class Tests {
    private static boolean aBoolean;
    private static char aChar;
    private static byte aByte;
    private static short aShort;
    private static int anInt;
    private static long aLong;
    private static float aFloat;
    private static double aDouble;


    public static void main(String[] args) {

        /*String str = "123";
        System.out.println(str);
        swap(str);
        System.out.println(str);*/
        int[] arr = {1,2,3,4,5,6};
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + "\t");
        }
        System.out.println();
        swap2(arr);
        System.out.println();
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + "\t");
        }
    }

    public static void swap(String str){
        str = "456";
        System.out.println("swap:" + str);
    }

    public static void swap(int[] arr){
        arr = new int[]{6,5,4,3,2,1};
        for (int i = 0; i < arr.length; i++) {
            System.out.print("swap:" + arr[i] + "\t");
        }

    }

    public static void swap2(int[] arr){
        arr[0] = 6;
        arr[1] = 5;
        arr[2] = 4;
        arr[3] = 3;
        arr[4] = 2;
        arr[5] = 1;
        for (int i = 0; i < arr.length; i++) {
            System.out.print("swap:" + arr[i] + "\t");
        }

    }
}

interface TestInterface {
    default public void test() {
        System.out.println("test");
    }
}

class TestInterfaceClass implements TestInterface{

    @Override
    public void test() {
        TestInterface.super.test();
    }
}
